﻿using NUlid;

namespace K9Nano.Resources;

public class FileResource : ResourceBase
{
    /// <summary>
    /// 文件绝对路径
    /// </summary>
    public string FilePath { get; set; }

    /// <summary>
    /// 文件名称，方便下载
    /// </summary>
    public string FileName { get; set; }

    public FileResource()
    {        
    }

    public FileResource(string filePath, string? fileName)
    {
        Id = Ulid.NewUlid().ToString();
        FilePath = filePath;
        FileName = fileName ?? Path.GetFileName(filePath);
    }
}
